<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-sm-12">
        <div class="ibox-title">
            <h5>代理商管理</h5>
        </div>
        <div class="ibox-title">
             <a href="<?php echo e(route('agent.create')); ?>" link-url="javascript:void(0)"><button class="btn btn-primary btn-sm" type="button"><i class="fa fa-plus-circle"></i> 新代理商加盟</button></a>   
       </div>
            <div class="ibox-content" style="display: block;">
                <form role="form" class="form-inline">
                    <div class="form-group">
                    
                        <label for="exampleInputEmail2" class="control-label">名下财务公司数量</label>
                        <!-- <input type="email" placeholder="请输入用户名" id="exampleInputEmail2" class="form-control"> -->
                        <select class="form-control" name="account">
							<option selected="" value="全部">全部</option>
							<option value="100以下">100以下</option>
							<option value="100-500">100-500</option>
							<option value="500-1000">500-1000</option>
							<option value="1000以上">1000以上</option>
                        </select>   

                        <label for="exampleInputEmail2" class="control-label">状态</label>
                        <!-- <input type="email" placeholder="请输入用户名" id="exampleInputEmail2" class="form-control"> -->
                        <select class="form-control" name="account">
							<option value="正常">正常</option>
							<option value="停用">停用</option>
                        </select>   

                        <label for="exampleInputEmail2" class="control-label">入驻时长</label>
                        <!-- <input type="email" placeholder="请输入用户名" id="exampleInputEmail2" class="form-control"> -->
                        <select class="form-control" name="account">
				            <option selected="" value="全部">全部</option>
				            <option value="3个月以下">3个月以下</option>
				            <option value="3-6个月">3-6个月</option>
				            <option value="6-12个月">6-12个月</option>
				            <option value="12个月以上">12个月以上</option>
                        </select>                                                                                               
                    </div>

                    <div class="input-group">
                        <input type="text" name="nameLike" class="form-control" placeholder="输入公司名称">
                        <span class="input-group-btn"> 
                            <button type="submit" class="btn btn-primary">搜索</button> 
                        </span>                                       
                    </div>                    
                </form>
            </div>
                  
        <div class="ibox-content">
                <table class="table table-striped table-bordered table-hover m-t-md">
                    <thead>
                    <tr>
                        <th class="text-center" width="100">序号</th>
                        <th class="text-center" width="100">公司名称</th>
                        <th class="text-center" width="150">所在地</th>
                        <th class="text-center" width="100">财务公司数量</th>
                        <th class="text-center" width="100">平台余额(余豆)</th>
                        <th class="text-center" width="80">入驻时间</th>
                        <th class="text-center" width="80">合作状态</th>
                        <th class="text-center" width="100">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php $__currentLoopData = $agents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
                        <tr>
                            <td class="text-center"><?php echo e($item->id); ?></td>
                            <td class="text-center"><?php echo e($item->company_name); ?></td>
                            <td class="text-center"><?php echo e($item->address); ?></td>                           
                            <td class="text-center"><?php echo e($item->company_count); ?></td>  
                            <td class="text-center"><?php echo e($item->balance); ?></td>
                            <td class="text-center"><?php echo e($item->create_date); ?></td>
                            <td class="text-center"><?php echo e($item->company_state); ?></td>   
                            <td class="text-center">                       
                               <div class="btn-group">
                                    <a href="<?php echo e(route('admins.edit',$item->id)); ?>">
                                        <button class="btn btn-primary btn-xs" type="button"><i class="fa fa-paste"></i> 修改</button>
                                    </a>
                                   
                                    <a href="<?php echo e(route('admins.status',['status'=>1,'id'=>$item->id])); ?>">
                                        <button class="btn btn-info btn-xs" type="button"><i class="fa fa-warning"></i> 恢复</button></a>
                                    
                                            <a href="<?php echo e(route('admins.status',['status'=>2,'id'=>$item->id])); ?>"><button class="btn btn-warning btn-xs" type="button"><i class="fa fa-warning"></i> 禁用</button></a>
                                   
                                    <a href="<?php echo e(route('admins.delete',$item->id)); ?>"><button class="btn btn-danger btn-xs" type="button"><i class="fa fa-trash-o"></i> 删除</button></a>
                                </div>
                            </td>

                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            <div class="pull-right pagination m-t-no">
                <div class="text-center">
                    <?php echo e($agents->links()); ?>

                </div>
                <div>
                </div>
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>